use "C:\Users\Administrator\Desktop\City data.dta", clear

tab year,missing
  
destring num,replace
tsset num year 
xtdescribe
 
 
 ****Table 2
 
sum gdp pergdp treat investment labor government Open structure Education Save 
	
 
***************	Table 3
	 	   
xtreg gdp T  i.year,fe 
est store A_1
xtreg gdp T  investment labor government Open  structure Education Save  i.year,fe  
est store A_2
xtreg pergdp T  i.year,fe 
est store A_3
xtreg pergdp T investment labor government Open  structure Education Save  i.year,fe 
est store A_4	
xtreg  gdp  h10-h13 i.year,fe 
est store A_5
xtreg  gdp h10-h13  investment labor government Open  structure Education Save i.year ,fe
est store A_6	
xtreg  pergdp h10-h13 i.year,fe 
est store A_7
xtreg  pergdp h10-h13 investment labor government  Open structure Education Save i.year,fe 
est store A_8

est table A_*,   b(%6.3f)  star( 0.1 0.05  0.01)  /*
	*/stats(N ll F r2_a)

 

	esttab A_* using myout1.csv,replace ///
       star(* 0.1 ** 0.05 *** 0.01) ///
	   b(%6.3f) se(%6.3f) compress nogap ///     
	  stats(N  F r2 ,fmt(%12.0f %9.3f) ) varwidth(20)

 

 ********Table 4
 
xtreg  gdp T h2-h8   i.year,fe 
est store C_1
xtreg  gdp T h2-h8 investment labor government Open  structure Education Save i.year,fe
est store C_2	
xtreg  gdp T h2-h8 investment labor government Open  structure Education Save i.year if east!=1,fe
est store C_3
xtreg  pergdp T h2-h8 i.year,fe 
est store C_4
xtreg  pergdp T h2-h8 investment labor government Open structure Education Save i.year,fe 
est store C_5
xtreg  pergdp T h2-h8 investment labor government Open structure Education Save i.year if east!=1,fe 
est store C_6

est table C_*,   b(%6.3f)  star( 0.1 0.05  0.01)  /*
	*/stats(N ll F r2)	
	
	esttab C_* using myout1.csv,replace ///
       star(* 0.1 ** 0.05 *** 0.01) ///
	   b(%6.3f) se(%6.3f) compress nogap ///     
	  stats(N  F r2 ,fmt(%12.0f %9.3f) ) varwidth(20)
	
 
 
 ******Figure 4
 xtreg  gdp h2-h13  investment labor government Open  structure Education Save i.year ,fe
est store reg	
 
 coefplot reg, keep(h*) vertical recast(connect) yline(0) xline(9, lp(dash))

 ******Figure 5
 xtreg  pergdp h2-h13 investment labor government  Open structure Education Save i.year,fe 
est store reg1
 coefplot reg1, keep(h*) vertical recast(connect) yline(0) xline(9, lp(dash))

 
 
 ************************Table 5
 
psmatch2 treat investment labor government Open structure  Education Save ,out(gdp) ai(1) neighbor(1) ate
psmatch2 treat investment labor government Open structure  Education Save ,out(pergdp) ai(1) neighbor(1) ate


*****Table 6
 
xtreg gdp T  i.year if east==0 ,fe 
est store G_1
xtreg gdp T  investment labor government Open structure  Education Save i.year if east==0,fe  
est store G_2
xtreg pergdp T  i.year if east==0,fe 
est store G_3
xtreg pergdp T investment labor government Open structure  Education Save  i.year if east==0,fe 
est store G_4
xtreg gdp T  i.year if west==0,fe 
est store G_5
xtreg gdp T  investment labor government Open structure  Education Save i.year if west==0,fe  
est store G_6
xtreg pergdp T  i.year if west==0,fe 
est store G_7
xtreg pergdp T investment labor government Open structure  Education Save  i.year if west==0,fe 
est store G_8

 est table G_*,   b(%6.3f)  star( 0.1 0.05  0.01)  /*
	*/stats(N ll F r2_a)
  
  esttab G_* using myout1.csv,replace ///
       star(* 0.1 ** 0.05 *** 0.01) ///
	   b(%6.3f) se(%6.3f) compress nogap ///     
	  stats(N  F r2 ,fmt(%12.0f %9.3f) ) varwidth(20)
   
 
 
 *****Table 7
 
  xtreg gdp T    i.year if zhixia==0,fe  
est store D_1
 xtreg gdp T investment labor government Open  structure Education Save  i.year if zhixia==0,fe  
est store D_2
 xtreg pergdp T   i.year if zhixia==0,fe 
est store D_3
xtreg pergdp T investment labor government Open  structure Education Save  i.year if zhixia==0,fe 
est store D_4
  xtreg gdp T    i.year if zhixia1==0,fe  
est store D_5
 xtreg gdp T investment labor government Open  structure Education Save  i.year if zhixia1==0,fe  
est store D_6
 xtreg pergdp T  i.year if zhixia1==0,fe 
est store D_7
xtreg pergdp T investment labor government Open  structure Education Save  i.year if zhixia1==0,fe 
est store D_8

est table D_*,   b(%6.3f)  star( 0.1 0.05  0.01)  /*
	*/stats(N ll F r2_a)  
 
 esttab D_* using myout1.csv,replace ///
       star(* 0.1 ** 0.05 *** 0.01) ///
	   b(%6.3f) se(%6.3f) compress nogap ///     
	  stats(N  F r2 ,fmt(%12.0f %9.3f) ) varwidth(20)
 
 
 
 ********Table 8

xi:xtivreg2 gdp (T=iv) i.year,fe first
est store h_1	
xi:xtivreg2 gdp (T=iv)  investment labor government Open structure  Education Save  i.year,fe first
est store h_2
xi:xtivreg2 pergdp (T=iv) i.year,fe first
est store h_3	
xi:xtivreg2 pergdp (T=iv) investment labor government Open structure  Education Save i.year,fe first
est store h_4
	
 est table h_*,   b(%6.3f)  star( 0.1 0.05  0.01)  /*
	*/stats(N ll F r2_a) 

 esttab h_* using myout1.csv,replace ///
       star(* 0.1 ** 0.05 *** 0.01) ///
	   b(%6.3f) se(%6.3f) compress nogap ///     
	  stats(N  F r2_a ,fmt(%12.0f %9.3f) ) varwidth(20)
	  
 
 
 
 *******************Table 9
 
xtreg gdp random1  i.year,fe 
est store D_1
xtreg gdp random1 investment labor government Open  structure Education Save  i.year,fe  
est store D_2
xtreg pergdp random1  i.year,fe 
est store D_3
xtreg pergdp random1 investment labor government Open  structure Education Save  i.year,fe  
est store D_4
xtreg gdp random2  i.year,fe 
est store D_5
xtreg gdp random2 investment labor government Open  structure Education Save  i.year,fe  
est store D_6
xtreg pergdp random2  i.year,fe 
est store D_7
xtreg pergdp random2 investment labor government Open  structure Education Save  i.year,fe 
est store D_8
 
 est table D_*,   b(%6.3f)  star( 0.1 0.05  0.01)  /*
	*/stats(N ll F r2_a)  
 
 	esttab D_* using myout1.csv,replace ///
       star(* 0.1 ** 0.05 *** 0.01) ///
	   b(%6.3f) se(%6.3f) compress nogap ///     
	  stats(N  F r2 ,fmt(%12.0f %9.3f) ) varwidth(20)

  

*****Table 10	  
 
xtreg gdp T  investment labor government  Open structure Education Save  i.year if year>2007&year<2012,fe  
est store E_1
xtreg pergdp T investment labor government  Open structure Education Save  i.year if year>2007&year<2012,fe 
est store E_2
xtreg gdp T  investment labor government  Open structure Education Save  i.year if year>2006&year<2013,fe  
est store E_3
xtreg pergdp T investment labor government Open  structure Education Save  i.year if year>2006&year<2013,fe 
est store E_4
xtreg gdp T  investment labor government Open  structure Education Save  i.year if year>2005&year<2014,fe  
est store E_5
xtreg pergdp T investment labor government Open  structure Education Save  i.year if year>2005&year<2014,fe 
est store E_6

 est table E_*,   b(%6.3f)  star( 0.1 0.05  0.01)  /*
	*/stats(N ll F r2_a)  
	
	esttab E_* using myout1.csv,replace ///
       star(* 0.1 ** 0.05 *** 0.01) ///
	   b(%6.3f) se(%6.3f) compress nogap ///     
	  stats(N  F r2 ,fmt(%12.0f %9.3f) ) varwidth(20)
	  
 
 
 
 
 *****Table 11
 
 
 	
xtreg  gdp T K*  i.year,fe 
est store F_1
xtreg  gdp T K* investment labor government Open structure Education Save i.year,fe 
est store F_2	
xtreg  pergdp T K* i.year,fe 
est store F_3
xtreg  pergdp T K*  investment labor government Open structure  Education Save i.year,fe  
est store F_4
xtreg  gdp T M* investment labor government Open structure Education Save i.year,fe 
est store F_5	
xtreg  gdp T M* N* investment labor government Open structure Education Save i.year,fe 
est store F_6
xtreg  pergdp T M*  investment labor government Open structure  Education Save i.year,fe  
est store F_7
xtreg  pergdp T M* N* investment labor government Open structure  Education Save i.year,fe  
est store F_8		
	
	
est table F_*,   b(%6.3f)  star( 0.1 0.05  0.01)  /*
	*/stats(N ll F r2)	
	
 esttab F_* using myout1.csv,replace ///
       star(* 0.1 ** 0.05 *** 0.01) ///
	   b(%6.3f) se(%6.3f) compress nogap ///     
	  stats(N  F r2 ,fmt(%12.0f %9.3f) ) varwidth(20)
	  


 
 ***********Table 14
 
xtreg fnum0 T  i.year,fe 
est store H_1
xtreg fnum0 T  investment labor government    i.year,fe  
est store H_2
xtreg fnum0 T  investment labor government Open  structure Education Save  i.year,fe  
est store H_3
xtreg fnum1 T  i.year,fe 
est store H_4
xtreg fnum1 T investment labor government    i.year,fe 
est store H_5
xtreg fnum1 T investment labor government Open  structure Education Save  i.year,fe 
est store H_6

 est table H_*,   b(%6.3f)  star( 0.1 0.05  0.01)  /*
	*/stats(N ll F r2_a)  

   esttab H_* using myout1.csv,replace ///
       star(* 0.1 ** 0.05 *** 0.01) ///
	   b(%6.3f) se(%6.3f) compress nogap ///     
	  stats(N  F r2 ,fmt(%12.0f %9.3f) ) varwidth(20)
 
 
 
 